Discover millions of ebooks, audiobooks, and so much more with a free trial

Only $11.99/month after trial. Cancel anytime.

Unavailable
JavaScript: The Good Parts: The Good Parts
Unavailable
JavaScript: The Good Parts: The Good Parts
Unavailable
JavaScript: The Good Parts: The Good Parts
Ebook172 pages2 hours

JavaScript: The Good Parts: The Good Parts

Rating: 4 out of 5 stars

4/5

()

Currently unavailable

Currently unavailable

About this ebook

Most programming languages contain good and bad parts, but JavaScript has more than its share of the bad, having been developed and released in a hurry before it could be refined. This authoritative book scrapes away these bad features to reveal a subset of JavaScript that's more reliable, readable, and maintainable than the language as a whole—a subset you can use to create truly extensible and efficient code.

Considered the JavaScript expert by many people in the development community, author Douglas Crockford identifies the abundance of good ideas that make JavaScript an outstanding object-oriented programming language-ideas such as functions, loose typing, dynamic objects, and an expressive object literal notation. Unfortunately, these good ideas are mixed in with bad and downright awful ideas, like a programming model based on global variables.

When Java applets failed, JavaScript became the language of the Web by default, making its popularity almost completely independent of its qualities as a programming language. In JavaScript: The Good Parts, Crockford finally digs through the steaming pile of good intentions and blunders to give you a detailed look at all the genuinely elegant parts of JavaScript, including:

  • Syntax
  • Objects
  • Functions
  • Inheritance
  • Arrays
  • Regular expressions
  • Methods
  • Style
  • Beautiful features

The real beauty? As you move ahead with the subset of JavaScript that this book presents, you'll also sidestep the need to unlearn all the bad parts. Of course, if you want to find out more about the bad parts and how to use them badly, simply consult any other JavaScript book.

With JavaScript: The Good Parts, you'll discover a beautiful, elegant, lightweight and highly expressive language that lets you create effective code, whether you're managing object libraries or just trying to get Ajax to run fast. If you develop sites or applications for the Web, this book is an absolute must.

LanguageEnglish
Release dateMay 8, 2008
ISBN9780596153830
Unavailable
JavaScript: The Good Parts: The Good Parts
Author

Douglas Crockford

Douglas Crockford is a Senior JavaScript Architect at Yahoo!, well known for introducing and maintaining the JSON (JavaScript Object Notation) format. He's a regular speaker at conferences on advanced JavaScript topics, and serves on the ECMAScript committee.

Related to JavaScript

Related ebooks

Software Development & Engineering For You

View More

Related articles

Reviews for JavaScript

Rating: 4.167630079768786 out of 5 stars
4/5

173 ratings9 reviews

What did you think?

Tap to rate

Review must be at least 10 words

  • Rating: 4 out of 5 stars
    4/5
    Crockford, the irreverent guru, takes us on a whirlwind tour de force through the parts of JavaScript that matter. Condensed and pithy, this is a must-read guidebook for even seasoned web devs. Finally. I understand closures. Finally.
  • Rating: 3 out of 5 stars
    3/5
    some of the topics touched by this book are very important but it's a pity that at times the narration is very very dry, it becomes like a conversation between the author and a reader that needs to know a priori what the author is going to point or at least have a feeling about it. Examples are not enough and they are outside of a context or story so it's fairly difficult to get the whole picture unless you let yourself drive by an illusion of knowledge. Maybe a design patterns approach, at least for some topics, showing alternatives and forces and contexts, would have helped. But is also true that the book would have been much much bigger and maybe too expensive.For example if you want to learn about closures, callbacks and other patterns in practice, there are better resouces, for example Stoyan Stefanov books. Of course this book has the merit to be one of the first to focus on design issues and reading it will not be bad anyway.And the book is designed to cover only the ECMA specification, not the various practical uses of the language in contexts like browsers, scripting engines, etc. So, concluding, this book shall be good for Javascript experts that are just looking for a formalization of important core language best practices or for those that have followed for long time the wrong directions (as the author says too many wrong books have been written on javascript) and want to steer in the right way, knowing that maybe they will also need to look for other resources. But is not the best for the wider audience of programmers that want to learn Javascript the right way and in its most practical applications.
  • Rating: 5 out of 5 stars
    5/5
    Very concise and on-point description of the core Javascript language. At times I found it a bit too terse though and had to use the Internet for help.
  • Rating: 3 out of 5 stars
    3/5
    I was never going to be thrilled with this book because ugh, javascript.
    But I was expecting more than a typical 2-star throwaway tech book. It was hard to get past the inconsistency (globals variables are bad, let's tack new methods onto global prototype objects!), bad editing, and repetition (I think one code snippet was repeated a total of 3 times).

    A lot of people seem to like this book. If the idea of subsetting a language to produce a better variant is new to you, or if you've been stuck in the javascript salt mines, without noticing the river Lisp curving its way through them, or perhaps if protypical inheritance is a new concept for you, I can see how it could be a breath of fresh air. None of that holds for me, so it wasn't. The javascript subset he comes up with seems rather clumsy, and verbose, and easy to get wrong -- not very compelling.

    Also, I disliked the railroad diagrams. In most cases a short English description would have been easier to understand, or a BNF would have been easier to read and equally precise. Many of the diagrams seemed gratuitous. They may read better on paper than on a screen. I read it in epub format, which also suffered from an unclosed italics tag messing up a chapter.

    The parts I did like: The evidence of a keen mind on the other end of the book, and occasional flashes of insight. The clearest descripton of the "this" scoping mess that I've seen. Good descriptions of many of the stupid gotchas in the language, including the craziness that are javascript arrays.

    If it had been called "Javascript: The Bad Parts (and a not very compelling attempt to work around them)" I'd probably feel like I got my money's worth.
  • Rating: 4 out of 5 stars
    4/5
    Javascript is a beautiful language with some pitfalls. This book provides a thorough introduction to its flaws and how to avoid them.The book is terse in some places -- for example, I wish Crockford had justified his distaste for the "continue" statement -- and somewhat repetitive in others, yet the book is a great way to gain insight into the flow of the language.A lot of what is great about modern Javascript, from "use strict" to CoffeeScript to various linters, derives from Crockford's criticism.
  • Rating: 4 out of 5 stars
    4/5
    This along with JavaScript: The Definitive Guide are the two must read books for any JS programmers out there. Crockford lays out in very clear terms what's good (and bad) about JS in it's current form. His guidelines for how to use it effectively seem very solid based on my experiences.It helps that you can easily read through the majority of this book in a couple hours. But it's also one to keep around and flip through every so often when you need a refresher.
  • Rating: 4 out of 5 stars
    4/5
    An essential reference by Douglas Crockford, the programmer who has worked to popularise both the JSON data format and the JavaScript language. With that kind of background Crockford has become an authoritative voice on "the good parts" of the specification and his writing delivers on the promise of providing a programmer with exactly what he needs to know about JavaScript, which has rapidly become the lingua franca of the Web. This book is a handy desk reference at work, if you're still accustomed to dead tree manuals.
  • Rating: 5 out of 5 stars
    5/5
    A must read for any programmer using JavaScript.
  • Rating: 4 out of 5 stars
    4/5
    I'd been meaning to read this for years and finally picked up a copy in late 2019, 11 years after it came out. I'd picked up some JavaScript here and there and have been using JSON since it exploded in popularity. Earlier this year I worked through a book on D3, so I had a decent amount of exposure, but there were still some quirks I didn't have my head around. This very readable book really clarified things, especially about prototypal inheritance and the unfortunate non-block scoping rules. The "good parts" can be summed up as the "functional parts." There are some great code examples of how to use closures and how to build programs using function expressions. I'm a little leery of some of his suggestions, e.g., in Chapter 4 where Function is augmented to obviate the need to type .prototype, if only because I don't know enough about common practice if this advice is generally followed.